package test;

import java.util.Scanner;

public class _0508 {
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        if (s.startsWith("王")) {
            System.out.println("111");
        }
    }

    public static void main(String[] args) {
        String s = "aabbbbbbbccddaaabccdd";
        StringBuilder builder = new StringBuilder();
        builder.append(s.charAt(0));

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (i != 0 && s.charAt(i-1) != s.charAt(i)) {
                builder.append(c);
            }
        }

        System.out.println(builder.toString());
    }
}
